package com.wanxi.coupons.mapper;


import com.wanxi.coupon.api.entity.Coupon;
import com.wanxi.coupon.api.entity.CouponEnterprise;
import com.wanxi.coupon.api.entity.CouponSku;
import com.wanxi.coupon.api.entity.CouponStatistic;
import com.wanxi.coupon.api.query.CommonQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CouponEnterpriseMapper  {

    List<Coupon> findAll(CommonQuery queryData);

    List<CouponStatistic> findStatistic(CommonQuery queryData);

    List<Coupon> findById( Long id);

    int add(Coupon data);

    int delete(Integer id);

//    商家优惠券关系表
    int addEnterpriseCoupon(CouponEnterprise data);

    int getCount(CommonQuery queryData);

    //    商品优惠券关系表
    int addSkuCoupon(List<CouponSku> list);

    int addStatistic(Long couponId);
}
